<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>添加/修改保险公司</title>
<c:import url="/ctrl/simpleheader"></c:import>
<script type="text/javascript" src="/scripts/insurer/detail.js"></script>
</head>
<body>
  <div title="保险公司信息">
    <div style="padding: 10px 0 10px 60px">
      <table>
        <tr>
          <td>保险公司:</td>
          <td><c:choose>
              <c:when test="${insurer!=null}">
                <c:out value="${insurer.companyName}" />
              </c:when>
              <c:otherwise>
                <input type="text" id="name" name="name"
                  style="width: 160px;"></input>
              </c:otherwise>
            </c:choose></td>
        </tr>
        <tr>
          <td>简称:</td>
          <td><input type="text" id="shortname" name="shortname"
            value="<c:out
                      value="${insurer.companyShortName}" />"></input></td>
        </tr>
        <tr>
          <td>网址:</td>
          <td><input type="text" id="website" name="website"
            value="<c:out
                      value="${insurer.companyWebsite}" />"></input></td>
        </tr>
        <tr>
          <td>logo:</td>
          <td><input type="text" id="logo" name="logo"
            value="<c:out
                      value="${insurer.companyLogo}" />"></input></td>
        </tr>
        <tr>
          <td>前缀:</td>
          <td><input type="text" id="ex" name="ex"
            value="<c:out
                      value="${insurer.companyEx}" />"></input></td>
        </tr>
        <tr>
          <td>状态:</td>
          <td><c:forEach var="status" items="${statusList}">
              <input type="radio" name="status"
                value="<c:out
                      value="${status.index}" />"
                <c:if test="${status.index==insurer.companyStatus}"> checked="checked"</c:if>>
              <c:out value="${status.name}" />&nbsp;
          </c:forEach></td>
        </tr>
      </table>
    </div>
    <div style="text-align: center; padding: 5px">
      <c:choose>
        <c:when test="${insurer!=null}">
          <a href="javascript:void(0)"
            onclick="submitModify('<c:out
              value="${insurer.companyId}" />')">保存</a>
        </c:when>
        <c:otherwise>
          <a href="javascript:void(0)" onclick="submitCreate()">添加保险公司</a>
        </c:otherwise>
      </c:choose>
    </div>
  </div>
</body>
</html>